Natural Semantics and Some of Its Meta-Theory in Elf
نویسندگان
چکیده
Operational semantics provide a simple, high-level and elegant means of specifying interpreters for programming languages. In natural semantics, a form of operational semantics, programs are traditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. Hannan and Miller combined these methods with higher-order representations using .\Prolog. In this paper we go one step further and investigate the use of the logic programming language Elf to represent natural semantics. Because Elf is based on the LF Logical Framework with dependent types, it is possible to write programs that reason about their own partial correctness. We illustrate these techniques by giving type checking rules and operational semantics for Mini-ML, a small functional language based on a simply typed .\-calculus with polymorphism, constants, products, conditionals, and recursive function definitions. We also partially internalize proofs for some metatheoretic properties of Mini-ML, the most difficult of which is subject reduction.
منابع مشابه
Elf: A Meta-Language for Deductive Systems (System Descrition)
1 Overview Elf is a uniform metalanguage for the formalization of the theory of programming languages and logics. It provides means for 1. specifying the abstract syntax and semantics of an object language in a natural and direct way; 2. implementing related algorithms (e.g., for type inference, evaluation, or proof search); and 3. representing proofs of meta-theorems about an object language, ...
متن کاملElf: A Meta-Language for Deductive Systems
Its conceptual basis are deductive systems which are used pervasively in the study of logic and the theory of programming languages. Logics and type systems for programming languages, for example, are often specified via inference rules. Structured operational semantics and natural semantics also employ deductive systems, and other means for semantic specification (for example, by rewrite rules...
متن کاملA Comparative Study of the “Ideal Observer” in Meta-ethics and the “Divine Command” Theory
The two theories of “ideal observer” and “divine command” are theories on constructionism and voluntarism. According to the ideal theory, ethical realities are defined based on the attitudes of the assumed ideal observers and the foundation of these theories is formed on negation of the independent ethical realities. Therefore, existence of independent and evident ethical realities based on whi...
متن کاملModularity in the LF Logical Framework
Formal deductive systems play an important role in computer science, particularly in the areas of logic and semantics of programming languages. They are employed in three different, but obviously related roles. Firstly, they are used to specify logics, type systems, operational semantics and other aspects of languages. Secondly, they form the basis for the implementation of such deductive syste...
متن کاملFunctorial semantics of topological theories
Following the categorical approach to universal algebra through algebraic theories, proposed by F.~W.~Lawvere in his PhD thesis, this paper aims at introducing a similar setting for general topology. The cornerstone of the new framework is the notion of emph{categorically-algebraic} (emph{catalg}) emph{topological theory}, whose models induce a category of topological structures. We introduce t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1991